/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tp.PLK.correct;

/**
 *
 * @author Devon
 */
class Customer
{

    CreditCard card;
    Cash cash;
    Check check;

    public void withdraw(double funds)
    {
        if(cash.hasMoreThan(funds))
        {
            cash.withdraw(funds);
        }
        else if(card.hasMoreThan(funds))
        {
            cash.withdraw(funds);
        }
        else
        {
            check.write(funds);
        }
    }

    Object getCreditCard()
    {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}
